package com.sugon.service.impl;

import cn.hutool.core.util.RandomUtil;
import com.sugon.dao.DevSpecialWorstationDao;
import com.sugon.entity.DevSpecialWorstationEntity;
import com.sugon.service.DevSpecialWorstationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 特殊设备工位关联Service实现类
 *
 * @author sugon
 * @date 2019-07-26 15:31:17
 */
@Service("devSpecialWorstationService")
public class DevSpecialWorstationServiceImpl implements DevSpecialWorstationService {
    @Autowired
    private DevSpecialWorstationDao devSpecialWorstationDao;

    @Override
    public DevSpecialWorstationEntity queryObject(String id) {
        return devSpecialWorstationDao.queryObject(id);
    }

    @Override
    public List<DevSpecialWorstationEntity> queryList(Map<String, Object> map) {
        return devSpecialWorstationDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return devSpecialWorstationDao.queryTotal(map);
    }

    @Override
    public int save(DevSpecialWorstationEntity devSpecialWorstation) {
        devSpecialWorstation.setId(RandomUtil.randomString(32));
        return devSpecialWorstationDao.save(devSpecialWorstation);
    }

    @Override
    public int update(DevSpecialWorstationEntity devSpecialWorstation) {
        return devSpecialWorstationDao.update(devSpecialWorstation);
    }

    @Override
    public int delete(String id) {
        return devSpecialWorstationDao.delete(id);
    }

    @Override
    public int deleteBatch(String[] ids) {
        return devSpecialWorstationDao.deleteBatch(ids);
    }
}
